package com.kgcx.push.service;

import com.kgcx.push.entity.PositionLog;
import com.kgcx.push.mapper.PositionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author 何凯
 * @version 0.1
 * @description
 * @time 2018/5/9 15:26
 * @since 0.1
 */
@Service
public class PositionService{
    @Autowired
    private PositionMapper positionMapper;

    public void save(PositionLog positionLog) {
        positionMapper.insert(positionLog);
    }

    /**
     * 查询所有
     * @return
     */
    public List<PositionLog> selectListForDistinct(){
        return positionMapper.selectListForDistinct();
    }

    /***
     * 清空所有数据
     */
    public void deleteAll(){ positionMapper.delete(new PositionLog()); }
}
